package book.discount
import io.github.talelin.latticy.model.ChargeDataItemDO
import java.math.BigDecimal

global io.github.talelin.latticy.service.impl.AccuracyServiceImpl accuracyService
global io.github.talelin.latticy.model.FeeDetailDO fee
global java.math.BigDecimal ruleCost

rule "ruleName"
when
$chargeDataItem:ChargeDataItemDO(cdt)
then
fee.setBaseCost(new BigDecimal(${(baseCost)}).setScale(2, 1));
absoluteCollection;
fee.setRuleCost(ruleCost);
end
